1. Field of the Invention
The present invention relates to a method and input device of simulating a mouse with a keyboard, more particularly, to a method and input device of simulating movement of the pointer controlled by the mouse via pressing keys in the keyboard.
2. Description of the Prior Art
Keyboard, mouse, and touchpad are standard input devices equipped by a laptop. Please refer to FIG. 1. FIG. 1 is a schematic diagram of an input device 10 according to prior art . The input device 10 is used by a laptop and includes a keyboard 100, a mouse 102 and a touchpad 104. The keyboard 100 is a switch matrix composed of multiple switches, and a keyboard controller 106 detects a press of each key and outputs a detection result to an operating system 120 by a keyboard driver 110. The mouse 102 includes components as buttons, a scroll wheel and a motion sensor, etc, and a built-in controller detects a trigger of each component and outputs a detection result to the operating system 120 by a mouse driver 112. The touchpad 104 is composed of touch components arranged in a matrix, and a touchpad controller 108 detects a touch of each component and outputs a detection result to the operating system 120 by a touchpad driver 114.
In detail, after a user selects English as a language of the keyboard 100, when one of the keys is pressed, the keyboard controller 106 detects a location of a switch in the switch matrix corresponding to the pressed key, obtains a scan code related to the location of the switch according to the keyboard scan code table related to the language of the keyboard 100, and outputs the scan code to the keyboard driver 110. A key-pressed event and a key-released event are related to different scan codes respectively. Afterwards, the keyboard driver 110 translates the scan code into a key code which is capable of being processed by the operating system 120. Since each character or symbol has its related scan code, the operating system 120 can obtain the input character or symbol according to the key code generated by the key driver 110, for calculating or displaying correctly. In addition, when the user moves the mouse 102, the built-in controller receives a movement data in X-Y axes of the mouse 102 and then transmits the movement data to the mouse driver 112. The operating system 120 receives the movement data of the mouse 102 by the mouse driver 110 and control movement of a pointer shown on a screen of the laptop. When the user controls movement of the pointer by using the touchpad 104 with fingers, the touchpad controller 108 receives the movement data in X-Y axes generated by fingers of the user on the touchpad 104 so that the operating system 120 controls movement of the pointer shown on the screen.
The touchpad provides the same function as the mouse and can replace the mouse to increase convenience for using the laptop. However, the touchpad occupies large area on the laptop. For the touchpad settled under the keyboard, even though the user does not use the touchpad, the user may touch the touchpad while using the keyboard, which causes incorrect movement of the pointer. Therefore, placement of the touchpad is a key point to develop a miniature and functional laptop.